package com.yicheng.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yicheng.dao.SwiperDao;
import com.yicheng.entity.Image;
import com.yicheng.entity.Swiper;
import com.yicheng.service.SwiperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SwiperServiceImpl extends ServiceImpl<SwiperDao, Swiper> implements SwiperService {

    @Autowired
    private SwiperDao swiperDao;

    @Override
    public List<Swiper> getSwipers(int cate) {
        LambdaQueryWrapper<Swiper> lwq = new LambdaQueryWrapper<>();
        lwq.eq(true,Swiper::getCate,cate);
        return swiperDao.selectList(lwq);
    }
}
